<?php
include('conn.php');
$collection = $db -> account_xiyou;
$one = $collection->find();

foreach ($one as $value) {
  //
 
 $time = date("Y/m/d H:i:s",$value[acregt]);
    
 $sql = "select * from game_user where user='$value[key]'";
  $result = mysql_query($sql);
  $num = mysql_num_rows($result);
  if ($num == 0 ){
    
    $sql = "insert into game_user (user,pass,code,money,logtime) value ('$value[key]','$value[pwd]','$value[actype]',0,'$time')";
    $result=mysql_query($sql);
  }
  
}


?>